#include<bits/stdc++.h>
using namespace std;
int r[100005][2];
int p[100005];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin >> n;
    for(int i = 1;i <= n; i++)
    {
        int x;
        scanf("%d",&x);
        r[x][1]++;
        r[x][2]++;
    }
    int cnt = 0;
    for(int i = 1; i <= 100000; i++)
    {
        if(r[i][1] != 0)
        {
            cnt++;
            p[cnt] = i;

        }
    }
    int ans = n;
    int nown = 1, nextn = 2;
    while(nextn <= cnt)
    {
        if(nown == nextn)nextn++;
        if(r[p[nextn]][2] > r[p[nown]][1])
        {

            r[p[nextn]][2] -= r[p[nown]][1];
            ans -= r[p[nown]][1];
            r[p[nown]][1] = 0;
            nown++;
        }
        else
        {

            r[p[nown]][1] -= r[p[nextn]][2];
            ans -= r[p[nextn]][2];
            r[p[nextn]][2] = 0;
            nextn++;
            if(r[p[nextn]][2] == r[p[nown]][1])nown++;
        }
    }
    cout << ans << endl;

    return 0;
}
